Skip to content

fix(index): replace this.requestAnimationFrame#1

Merged
valdio merged 1 commit intovaldio:masterfrom
shubhamdeol:master
Aug 7, 2019
Merged

fix(index): replace this.requestAnimationFrame#1
valdio merged 1 commit intovaldio:masterfrom
shubhamdeol:master

Conversation

@shubhamdeol
Copy link

My app was crashing on screen orientation change, due to this.requestAnimationFrame
So I replaced this.requestAnimationFrame with request animation frame as requestAnimationFrame is globally available in react native.

requestAnimationFrame is a polyfill from the browser, in the browser as well it is scoped to the window object.
See here:
https://stackoverflow.com/questions/51258292/use-requestanimationframe-in-react-native

Replace this.requestAnimationFrame with request animation frame as **requestAnimationFrame** is globally available in react native.
requestAnimationFrame is a polyfill from the browser, in browser as well it is scoped to window object.
See here:
https://stackoverflow.com/questions/51258292/use-requestanimationframe-in-react-native
@valdio
Copy link
Owner

valdio commented Jul 17, 2019

@shubhamdeol can you provide more info about your use case in which your app crashed while using this package.
Can you provide any demo app?
Thanks in advance

@gamingumar
Copy link

Hey @valdio I am also facing the same issue, I am using ScrollableTabBar for renderTabBar. When screen orientation changes this error occurs. Please merge this PR

Screen Shot 2019-08-06 at 11 27 37 PM

@shubhamdeol
Copy link
Author

@gamingumar using above code I stopped getting this error. You can use my fork if you want:
https://github.com/shubhamdeol/react-native-scrollable-tabview

@valdio valdio merged commit 4074a5f into valdio:master Aug 7, 2019
@valdio
Copy link
Owner

valdio commented Aug 7, 2019

@gamingumar @shubhamdeol. Fix applied to the new version: v.0.8.12

@shubhamdeol
Copy link
Author

@valdio Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants